<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
  return view('home.home');
});

Route::group(['namespace' => 'Home'], function(){
  Route::get('gongshangzhuce' , 'HomeController@gongshangzhuce');
  Route::get('zhizhaobiangeng' , 'HomeController@zhizhaobiangeng');
  Route::get('dailijizhang' , 'HomeController@dailijizhang');
  Route::get('shangbiaozhuce' , 'HomeController@shangbiaozhuce');
  Route::get('jingshuixitong' , 'HomeController@jingshuixitong');
  Route::get('zhuanxiangshenpi' , 'HomeController@zhuanxiangshenpi');
  Route::get('canyin' , 'HomeController@canyin');

});

Route::get('admin', function () {
  return redirect('login');
});

Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'middleware' => 'auth'], function(){
  Route::get('article-list' , 'ArticleController@list');
  Route::get('article-add' , 'ArticleController@add');
  Route::post('article-save' , 'ArticleController@save');
  Route::post('article-update/{id}' , 'ArticleController@update');
  Route::post('article-remove/{id}' , 'ArticleController@remove');
  Route::get('article-show/{id}' , 'ArticleController@show');

});



Auth::routes();

Route::get('/home', 'HomeController@index');
